import request from '@/utils/request'

// 查询存储知识库列表
export function listKnowledge(query) {
  return request({
    url: '/knowledge/list',
    method: 'get',
    params: query
  })
}

// 查询存储知识库详细
export function getKnowledge(klId) {
  return request({
    url: '/knowledge/' + klId,
    method: 'get'
  })
}

// 新增存储知识库
export function addKnowledge(data) {
  return request({
    url: '/knowledge',
    method: 'post',
    data: data
  })
}

// 修改存储知识库
export function updateKnowledge(data) {
  return request({
    url: '/knowledge',
    method: 'put',
    data: data
  })
}

// 删除存储知识库
export function delKnowledge(klId) {
  return request({
    url: '/knowledge/' + klId,
    method: 'delete'
  })
}
